package com.ubao.dialog;


import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.ubao.R;

public class CamreaDialog extends Dialog {

	    Button photo_make, photo_album,btnCancel;
		private OnDialogListeren onListeren = null;
	public CamreaDialog(Context context, int theme) {
		super(context, theme);
		
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.cameraload_dilag);
		 
		photo_make = (Button) this.findViewById(R.id.photo_make);
			
		photo_album = (Button) this.findViewById(R.id.photo_album);
		
		btnCancel=(Button) this.findViewById(R.id.btnCancel);
		
		photo_make.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					if(onListeren != null){
						onListeren.OnClick(CamreaDialog.this, v, -1, false, null);
					}
				}
			});	
		
		photo_album.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				if(onListeren != null){
					onListeren.OnClick(CamreaDialog.this, v, -1, false, null);
				}
			}
		});	
		
		
		btnCancel.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				if(onListeren != null){
					onListeren.OnClick(CamreaDialog.this, v, -1, false, null);
				}
			}
		});	
		
	}
	
	public void setOnDialogListeren(OnDialogListeren l){
		onListeren = l;
	}

}
